package com.nwpu.pojo;

/**
 * Meeting
 *
 * @author 龙虹宇
 * @version 1.0
 * @date 2023 /11/11
 */
public class Meeting {
    // id自增计数
    private static int idCount = 0;
    private int id;
    private String username;
    private String otherUsername;
    private String start;
    private String end;
    private String title;

    /**
     * Instantiates a new Meeting.
     *
     * @param username      the username
     * @param otherUsername the other username
     * @param start         the start
     * @param end           the end
     * @param title         the title
     */
    public Meeting(String username, String otherUsername, String start, String end, String title) {
        this.username = username;
        this.otherUsername = otherUsername;
        this.start = start;
        this.end = end;
        this.title = title;
        // id自增
        this.id = ++idCount;
    }

    /**
     * Gets id.
     *
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * Sets id.
     *
     * @param id the id
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * Gets username.
     *
     * @return the username
     */
    public String getUsername() {
        return username;
    }

    /**
     * Sets username.
     *
     * @param username the username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * Gets other username.
     *
     * @return the other username
     */
    public String getOtherUsername() {
        return otherUsername;
    }

    /**
     * Sets other username.
     *
     * @param otherUsername the other username
     */
    public void setOtherUsername(String otherUsername) {
        this.otherUsername = otherUsername;
    }

    /**
     * Gets start.
     *
     * @return the start
     */
    public String getStart() {
        return start;
    }

    /**
     * Sets start.
     *
     * @param start the start
     */
    public void setStart(String start) {
        this.start = start;
    }

    /**
     * Gets end.
     *
     * @return the end
     */
    public String getEnd() {
        return end;
    }

    /**
     * Sets end.
     *
     * @param end the end
     */
    public void setEnd(String end) {
        this.end = end;
    }

    /**
     * Gets title.
     *
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * Sets title.
     *
     * @param title the title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    @Override
    public String toString() {
        return "Meeting{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", otherUsername='" + otherUsername + '\'' +
                ", start=" + start +
                ", end=" + end +
                ", title='" + title + '\'' +
                '}';
    }
}
